﻿using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace WebPattern.Core.Validators
{
    public class MaxMinLengthValidator : StringLengthValidator
    {
        public MaxMinLengthValidator(int upperBound)
            : base(1, upperBound) { }

        public MaxMinLengthValidator(int upperBound, string messageTemplate)
            : this(upperBound)
        {
            this.MessageTemplate = messageTemplate;
        }

        protected void DoValidate(string objectToValidate, ValidationResults validationResults)
        {
            base.DoValidate(objectToValidate, this, "", validationResults);
        }
    }
}
